<!DOCTYPE html>
<html lang="cn">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" type="text/css" href="./layui/css/layui.css">
	<link rel="stylesheet" type="text/css" href="./css/index.css">
</head>
<body onselectstart="return false">
<div id="root">

	<div class="element">
		<p class="EntryTitle">添加字段</p>
		<div class="ElementBtn">
			<span class="layui-btn layui-btn-primary AddNode" :data-type-Model="item.enname" v-for="item in assembly" @click="addNode($event)" v-html="item.name"></span>
		</div>
	</div>
	<div class="parent">
		<form class="layui-form" action="">
		  <div class="modelTpl" ></div>
		  <div class="layui-form-item">
		    <div class="layui-input-block">
		      <button class="layui-btn" lay-submit lay-filter="demo1" @click="submits()">立即提交</button>
		    </div>
		  </div>
		</form>		
	</div>
	<div class="attribute">
		<p class="EntryTitle">字段属性</p>
		<div class="attrCton layui-form">
			<nature></nature>
		</div>
	</div>
</div>
</body>
<script type="text/javascript" src="./layui/layui.js"></script>
<script type="text/javascript" src="./js/require.min.js" data-main="./js/config.js"></script>
<script>
		layui.use(['form', 'layedit', 'laydate'], function(){
		  var form = layui.form
		  ,layer = layui.layer
		  ,layedit = layui.layedit
		  ,laydate = layui.laydate;
		  //自定义验证规则
		  form.verify({
		    know:function(val,ktem){
		    	/*if(val==""){
		    		var text = $(ktem).attr("placeholder")
		    		return text
		    	}*/
		    },

		  });
		  form.on("submit(demo1)",function(){
		  	return false;
		  });
		  form.on("switch(Required)",function(data){
		  	var _t = data.elem
  			var TimeId = $(_t).attr('thisid');
    		var title = $(_t).val();
    		vue.$set(vue.attribute[TimeId],'Required',title);
		  })
		});

</script>
<script type="text/html" id="TemMuen">
    <nav id="Meun" style="position: absolute;z-index: 9999;display: none;">
        <%for(var i =0 ;i<=data.length-1;i++){%>
        <li class="<%=data[i].class%>"><%=data[i].name%></li>
        <%}%>
    </nav>
</script>
</html>